# 创建Student类
class Student(object):
    # 类属性count，默认为0
    count = 0
    def __init__(self, name):
        self.name = name
        # 每创建一次对象，类属性count+1
        Student.count += 1

# 测试
if __name__ == '__main__':
    # 循环创建3次，每次创建后输出Student类属性count的值
    for i in range(0,3):
        zs = Student('zhangsan')
        print(Student.count)